<!DOCTYPE html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <title>FindCUDAToolkit &mdash; CMake 4.1.1 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a2c47e09" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css?v=4d06bd55" />
    
    <script src="../_static/documentation_options.js?v=e6a937a4"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    
    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindCups" href="FindCups.html" />
    <link rel="prev" title="FindCoin3D" href="FindCoin3D.html" />
 

  </head><body>
    <input id="sidebar-check" type="checkbox" />
    <label id="sidebar-overlay" for="sidebar-check"></label>



    <div class="related relbar1" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="FindCups.html" title="FindCups"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="FindCoin3D.html" title="FindCoin3D"
             accesskey="P">previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" accesskey="U">cmake-modules(7)</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">FindCUDAToolkit</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="findcudatoolkit">
<span id="module:FindCUDAToolkit"></span><h1>FindCUDAToolkit<a class="headerlink" href="#findcudatoolkit" title="Link to this heading">¶</a></h1>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.17.</span></p>
</div>
<p>This script locates the NVIDIA CUDA toolkit and the associated libraries, but
does not require the <code class="docutils literal notranslate"><span class="pre">CUDA</span></code> language be enabled for a given project. This
module does not search for the NVIDIA CUDA Samples.</p>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.19: </span>QNX support.</p>
</div>
<section id="search-behavior">
<h2>Search Behavior<a class="headerlink" href="#search-behavior" title="Link to this heading">¶</a></h2>
<p>The CUDA Toolkit search behavior uses the following order:</p>
<ol class="arabic">
<li><p>If the <code class="docutils literal notranslate"><span class="pre">CUDA</span></code> language has been enabled we will use the directory
containing the compiler as the first search location for <code class="docutils literal notranslate"><span class="pre">nvcc</span></code>.</p></li>
<li><p>If the variable <span class="target" id="index-0-variable:CMAKE_&lt;LANG&gt;_COMPILER"></span><a class="reference internal" href="../variable/CMAKE_LANG_COMPILER.html#variable:CMAKE_&lt;LANG&gt;_COMPILER" title="CMAKE_&lt;LANG&gt;_COMPILER"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CUDA_COMPILER</span></code></a> or
the environment variable <span class="target" id="index-0-envvar:CUDACXX"></span><a class="reference internal" href="../envvar/CUDACXX.html#envvar:CUDACXX" title="CUDACXX"><code class="xref cmake cmake-envvar docutils literal notranslate"><span class="pre">CUDACXX</span></code></a> is defined, it will be used
as the path to the <code class="docutils literal notranslate"><span class="pre">nvcc</span></code> executable.</p></li>
<li><p>If the <code class="docutils literal notranslate"><span class="pre">CUDAToolkit_ROOT</span></code> cmake configuration variable (e.g.,
<code class="docutils literal notranslate"><span class="pre">-DCUDAToolkit_ROOT=/some/path</span></code>) <em>or</em> environment variable is defined, it
will be searched.  If both an environment variable <strong>and</strong> a
configuration variable are specified, the <em>configuration</em> variable takes
precedence.</p>
<p>The directory specified here must be such that the executable <code class="docutils literal notranslate"><span class="pre">nvcc</span></code> or
the appropriate <code class="docutils literal notranslate"><span class="pre">version.txt</span></code> or <code class="docutils literal notranslate"><span class="pre">version.json</span></code> file can be found
underneath the specified directory.</p>
</li>
<li><p>If the CUDA_PATH environment variable is defined, it will be searched
for <code class="docutils literal notranslate"><span class="pre">nvcc</span></code>.</p></li>
<li><p>The user's path is searched for <code class="docutils literal notranslate"><span class="pre">nvcc</span></code> using <span class="target" id="index-0-command:find_program"></span><a class="reference internal" href="../command/find_program.html#command:find_program" title="find_program"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_program()</span></code></a>.  If
this is found, no subsequent search attempts are performed.  Users are
responsible for ensuring that the first <code class="docutils literal notranslate"><span class="pre">nvcc</span></code> to show up in the path is
the desired path in the event that multiple CUDA Toolkits are installed.</p></li>
<li><p>On Unix systems, if the symbolic link <code class="docutils literal notranslate"><span class="pre">/usr/local/cuda</span></code> exists, this is
used.  No subsequent search attempts are performed.  No default symbolic link
location exists for the Windows platform.</p></li>
<li><p>The platform specific default install locations are searched.  If exactly one
candidate is found, this is used.  The default CUDA Toolkit install locations
searched are:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Platform</p></th>
<th class="head"><p>Search Pattern</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>macOS</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">/Developer/NVIDIA/CUDA-X.Y</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>Other Unix</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">/usr/local/cuda-X.Y</span></code></p></td>
</tr>
<tr class="row-even"><td><p>Windows</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\NVIDIA</span> <span class="pre">GPU</span> <span class="pre">Computing</span> <span class="pre">Toolkit\CUDA\vX.Y</span></code></p></td>
</tr>
</tbody>
</table>
<p>Where <code class="docutils literal notranslate"><span class="pre">X.Y</span></code> would be a specific version of the CUDA Toolkit, such as
<code class="docutils literal notranslate"><span class="pre">/usr/local/cuda-9.0</span></code> or
<code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\NVIDIA</span> <span class="pre">GPU</span> <span class="pre">Computing</span> <span class="pre">Toolkit\CUDA\v9.0</span></code></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When multiple CUDA Toolkits are installed in the default location of a
system (e.g., both <code class="docutils literal notranslate"><span class="pre">/usr/local/cuda-9.0</span></code> and <code class="docutils literal notranslate"><span class="pre">/usr/local/cuda-10.0</span></code>
exist but the <code class="docutils literal notranslate"><span class="pre">/usr/local/cuda</span></code> symbolic link does <strong>not</strong> exist), this
package is marked as <strong>not</strong> found.</p>
<p>There are too many factors involved in making an automatic decision in
the presence of multiple CUDA Toolkits being installed.  In this
situation, users are encouraged to either (1) set <code class="docutils literal notranslate"><span class="pre">CUDAToolkit_ROOT</span></code> or
(2) ensure that the correct <code class="docutils literal notranslate"><span class="pre">nvcc</span></code> executable shows up in <code class="docutils literal notranslate"><span class="pre">$PATH</span></code> for
<span class="target" id="index-1-command:find_program"></span><a class="reference internal" href="../command/find_program.html#command:find_program" title="find_program"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_program()</span></code></a> to find.</p>
</div>
</li>
</ol>
</section>
<section id="arguments">
<h2>Arguments<a class="headerlink" href="#arguments" title="Link to this heading">¶</a></h2>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">[&lt;version&gt;]</span></code></dt><dd><p>The <code class="docutils literal notranslate"><span class="pre">[&lt;version&gt;]</span></code> argument requests a version with which the package found
should be compatible. See <a class="reference internal" href="../command/find_package.html#find-package-version-format"><span class="std std-ref">find_package version format</span></a>
for more details.</p>
</dd>
</dl>
</section>
<section id="options">
<h2>Options<a class="headerlink" href="#options" title="Link to this heading">¶</a></h2>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">REQUIRED</span></code></dt><dd><p>If specified, configuration will error if a suitable CUDA Toolkit is not
found.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">QUIET</span></code></dt><dd><p>If specified, the search for a suitable CUDA Toolkit will not produce any
messages.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">EXACT</span></code></dt><dd><p>If specified, the CUDA Toolkit is considered found only if the exact
<code class="docutils literal notranslate"><span class="pre">VERSION</span></code> specified is recovered.</p>
</dd>
</dl>
</section>
<section id="imported-targets">
<h2>Imported Targets<a class="headerlink" href="#imported-targets" title="Link to this heading">¶</a></h2>
<p>An <a class="reference internal" href="../manual/cmake-buildsystem.7.html#imported-targets"><span class="std std-ref">imported target</span></a> named <code class="docutils literal notranslate"><span class="pre">CUDA::toolkit</span></code> is provided.</p>
<p>This module defines <span class="target" id="index-0-prop_tgt:IMPORTED"></span><a class="reference internal" href="../prop_tgt/IMPORTED.html#prop_tgt:IMPORTED" title="IMPORTED"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED</span></code></a> targets for each
of the following libraries that are part of the CUDAToolkit:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#cuda-runtime-library">CUDA Runtime Library</a></p></li>
<li><p><a class="reference internal" href="#cuda-driver-library">CUDA Driver Library</a></p></li>
<li><p><a class="reference internal" href="#cublas">cuBLAS</a></p></li>
<li><p><a class="reference internal" href="#cudla">cuDLA</a></p></li>
<li><p><a class="reference internal" href="#cufile">cuFile</a></p></li>
<li><p><a class="reference internal" href="#cufft">cuFFT</a></p></li>
<li><p><a class="reference internal" href="#curand">cuRAND</a></p></li>
<li><p><a class="reference internal" href="#cusolver">cuSOLVER</a></p></li>
<li><p><a class="reference internal" href="#cusparse">cuSPARSE</a></p></li>
<li><p><a class="reference internal" href="#cupti">cuPTI</a></p></li>
<li><p><a class="reference internal" href="#npp">NPP</a></p></li>
<li><p><a class="reference internal" href="#nvblas">nvBLAS</a></p></li>
<li><p><a class="reference internal" href="#nvgraph">nvGRAPH</a></p></li>
<li><p><a class="reference internal" href="#nvjpeg">nvJPEG</a></p></li>
<li><p><a class="reference internal" href="#nvidia-ml">nvidia-ML</a></p></li>
<li><p><a class="reference internal" href="#nvptx-compiler">nvPTX Compiler</a></p></li>
<li><p><a class="reference internal" href="#nvrtc">nvRTC</a></p></li>
<li><p><a class="reference internal" href="#nvjitlink">nvJitLink</a></p></li>
<li><p><a class="reference internal" href="#nvfatbin">nvFatBin</a></p></li>
<li><p><a class="reference internal" href="#nvtoolsext">nvToolsExt</a></p></li>
<li><p><a class="reference internal" href="#nvtx3">nvtx3</a></p></li>
<li><p><a class="reference internal" href="#opencl">OpenCL</a></p></li>
<li><p><a class="reference internal" href="#culibos">cuLIBOS</a></p></li>
</ul>
<section id="cuda-runtime-library">
<h3>CUDA Runtime Library<a class="headerlink" href="#cuda-runtime-library" title="Link to this heading">¶</a></h3>
<p>The CUDA Runtime library (cudart) are what most applications will typically
need to link against to make any calls such as <cite>cudaMalloc</cite>, and <cite>cudaFree</cite>.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cudart</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cudart_static</span></code></p></li>
</ul>
</section>
<section id="cuda-driver-library">
<h3>CUDA Driver Library<a class="headerlink" href="#cuda-driver-library" title="Link to this heading">¶</a></h3>
<p>The CUDA Driver library (cuda) are used by applications that use calls
such as <cite>cuMemAlloc</cite>, and <cite>cuMemFree</cite>.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cuda_driver</span></code></p></li>
</ul>
</section>
<section id="cublas">
<h3>cuBLAS<a class="headerlink" href="#cublas" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/cublas">CUDA Basic Linear Algebra Subroutine</a> library.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cublas</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cublas_static</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cublasLt</span></code> starting in CUDA 10.1</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cublasLt_static</span></code> starting in CUDA 10.1</p></li>
</ul>
</section>
<section id="cudla">
<h3>cuDLA<a class="headerlink" href="#cudla" title="Link to this heading">¶</a></h3>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.27.</span></p>
</div>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/cuda-for-tegra-appnote#cudla">NVIDIA Tegra Deep Learning Accelerator</a> library.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cudla</span></code> starting in CUDA 11.6</p></li>
</ul>
</section>
<section id="cufile">
<h3>cuFile<a class="headerlink" href="#cufile" title="Link to this heading">¶</a></h3>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.25.</span></p>
</div>
<p>The <a class="reference external" href="https://docs.nvidia.com/gpudirect-storage/api-reference-guide">NVIDIA GPUDirect Storage cuFile</a> library.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cuFile</span></code> starting in CUDA 11.4</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cuFile_static</span></code> starting in CUDA 11.4</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cuFile_rdma</span></code> starting in CUDA 11.4</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cuFile_rdma_static</span></code> starting in CUDA 11.4</p></li>
</ul>
</section>
<section id="cufft">
<h3>cuFFT<a class="headerlink" href="#cufft" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/cufft">CUDA Fast Fourier Transform</a> library.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cufft</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cufftw</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cufft_static</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cufft_static_nocallback</span></code> starting in CUDA 9.2, requires CMake 3.23+</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cufftw_static</span></code></p></li>
</ul>
</section>
<section id="curand">
<h3>cuRAND<a class="headerlink" href="#curand" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/curand">CUDA random number generation</a> library.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::curand</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::curand_static</span></code></p></li>
</ul>
</section>
<section id="cusolver">
<h3>cuSOLVER<a class="headerlink" href="#cusolver" title="Link to this heading">¶</a></h3>
<p>A <a class="reference external" href="https://docs.nvidia.com/cuda/cusolver">GPU accelerated linear system solver</a> library.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cusolver</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cusolver_static</span></code></p></li>
</ul>
</section>
<section id="cusparse">
<h3>cuSPARSE<a class="headerlink" href="#cusparse" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/cusparse">CUDA sparse matrix</a> library.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cusparse</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cusparse_static</span></code></p></li>
</ul>
</section>
<section id="cupti">
<h3>cupti<a class="headerlink" href="#cupti" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://developer.nvidia.com/cupti">NVIDIA CUDA Profiling Tools Interface</a>.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cupti</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::cupti_static</span></code></p></li>
</ul>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.27: </span></p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvperf_host</span></code>         starting in CUDA 10.2</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvperf_host_static</span></code>  starting in CUDA 10.2</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvperf_target</span></code>       starting in CUDA 10.2</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::pcsamplingutil</span></code>      starting in CUDA 11.3</p></li>
</ul>
</div>
</section>
<section id="npp">
<h3>NPP<a class="headerlink" href="#npp" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/npp">NVIDIA 2D Image and Signal Processing Performance Primitives</a> libraries.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><cite>nppc</cite>:</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppc</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppc_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppial</cite>: Arithmetic and logical operation functions in <cite>nppi_arithmetic_and_logical_operations.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppial</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppial_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppicc</cite>: Color conversion and sampling functions in <cite>nppi_color_conversion.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppicc</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppicc_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppicom</cite>: JPEG compression and decompression functions in <cite>nppi_compression_functions.h</cite>
Removed starting in CUDA 11.0, use <a class="reference internal" href="#nvjpeg">nvJPEG</a> instead.</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppicom</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppicom_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppidei</cite>: Data exchange and initialization functions in <cite>nppi_data_exchange_and_initialization.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppidei</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppidei_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppif</cite>: Filtering and computer vision functions in <cite>nppi_filter_functions.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppif</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppif_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppig</cite>: Geometry transformation functions found in <cite>nppi_geometry_transforms.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppig</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppig_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppim</cite>: Morphological operation functions found in <cite>nppi_morphological_operations.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppim</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppim_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppist</cite>: Statistics and linear transform in <cite>nppi_statistics_functions.h</cite> and <cite>nppi_linear_transforms.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppist</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppist_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppisu</cite>: Memory support functions in <cite>nppi_support_functions.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppisu</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppisu_static</span></code></p></li>
</ul>
</li>
<li><p><cite>nppitc</cite>: Threshold and compare operation functions in <cite>nppi_threshold_and_compare_operations.h</cite></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppitc</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nppitc_static</span></code></p></li>
</ul>
</li>
<li><p><cite>npps</cite>:</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::npps</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::npps_static</span></code></p></li>
</ul>
</li>
</ul>
</section>
<section id="nvblas">
<h3>nvBLAS<a class="headerlink" href="#nvblas" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/nvblas">GPU-accelerated drop-in BLAS</a> library.
This is a shared library only.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvblas</span></code></p></li>
</ul>
</section>
<section id="nvgraph">
<h3>nvGRAPH<a class="headerlink" href="#nvgraph" title="Link to this heading">¶</a></h3>
<p>A <a class="reference external" href="https://docs.nvidia.com/cuda/archive/10.0/nvgraph">GPU-accelerated graph analytics</a> library.
Removed starting in CUDA 11.0</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvgraph</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvgraph_static</span></code></p></li>
</ul>
</section>
<section id="nvjpeg">
<h3>nvJPEG<a class="headerlink" href="#nvjpeg" title="Link to this heading">¶</a></h3>
<p>A <a class="reference external" href="https://docs.nvidia.com/cuda/nvjpeg">GPU-accelerated JPEG codec</a> library.
Introduced in CUDA 10.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvjpeg</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvjpeg_static</span></code></p></li>
</ul>
</section>
<section id="nvptx-compiler">
<h3>nvPTX Compiler<a class="headerlink" href="#nvptx-compiler" title="Link to this heading">¶</a></h3>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.25.</span></p>
</div>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/ptx-compiler-api">PTX Compiler APIs</a>.
These are a set of APIs which can be used to compile a PTX program into GPU assembly code.
Introduced in CUDA 11.1
This is a static library only.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvptxcompiler_static</span></code> starting in CUDA 11.1</p></li>
</ul>
</section>
<section id="nvrtc">
<h3>nvRTC<a class="headerlink" href="#nvrtc" title="Link to this heading">¶</a></h3>
<p>A <a class="reference external" href="https://docs.nvidia.com/cuda/nvrtc">runtime compilation library for CUDA</a>.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvrtc</span></code></p></li>
</ul>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.26: </span></p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvrtc_builtins</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvrtc_static</span></code> starting in CUDA 11.5</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvrtc_builtins_static</span></code> starting in CUDA 11.5</p></li>
</ul>
</div>
</section>
<section id="nvjitlink">
<h3>nvJitLink<a class="headerlink" href="#nvjitlink" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/nvjitlink">JIT Link APIs</a>.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvJitLink</span></code> starting in CUDA 12.0</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvJitLink_static</span></code>  starting in CUDA 12.0</p></li>
</ul>
</section>
<section id="nvfatbin">
<h3>nvFatBin<a class="headerlink" href="#nvfatbin" title="Link to this heading">¶</a></h3>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.30.</span></p>
</div>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/nvfatbin">Fatbin Creator APIs</a>.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvfatbin</span></code> starting in CUDA 12.4</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvfatbin_static</span></code>  starting in CUDA 12.4</p></li>
</ul>
</section>
<section id="nvidia-ml">
<h3>nvidia-ML<a class="headerlink" href="#nvidia-ml" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://developer.nvidia.com/management-library-nvml">NVIDIA Management Library</a>.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvml</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvml_static</span></code> starting in CUDA 12.4</p></li>
</ul>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.31: </span>Added <code class="docutils literal notranslate"><span class="pre">CUDA::nvml_static</span></code>.</p>
</div>
</section>
<section id="nvtoolsext">
<span id="findcudatoolkit-nvtoolsext"></span><h3>nvToolsExt<a class="headerlink" href="#nvtoolsext" title="Link to this heading">¶</a></h3>
<div class="deprecated">
<p><span class="versionmodified deprecated">Deprecated since version 3.25: </span>With CUDA 10.0+, use <a class="reference internal" href="#nvtx3">nvtx3</a>.
Starting in CUDA 12.9 the <cite>nvToolsExt</cite> library no longer exists</p>
</div>
<p>The <a class="reference external" href="https://docs.nvidia.com/cuda/archive/9.0/profiler-users-guide#nvtx">legacy NVIDIA Tools Extension</a>.
This is a shared library only.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvToolsExt</span></code></p></li>
</ul>
</section>
<section id="nvtx3">
<span id="findcudatoolkit-nvtx3"></span><h3>nvtx3<a class="headerlink" href="#nvtx3" title="Link to this heading">¶</a></h3>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 3.25.</span></p>
</div>
<p>The header-only <a class="reference external" href="https://nvidia.github.io/NVTX/doxygen">NVIDIA Tools Extension</a> library.
Introduced in CUDA 10.0.</p>
<p>Targets created:</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvtx3</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::nvtx3_interop</span></code></p>
<div class="versionadded">
<p><span class="versionmodified added">Added in version 4.1.</span></p>
</div>
<p>This is provided by CUDA 12.9 and above for use by languages that
cannot consume C++ header-only libraries, such as <code class="docutils literal notranslate"><span class="pre">Fortran</span></code>.</p>
</li>
</ul>
</section>
<section id="opencl">
<h3>OpenCL<a class="headerlink" href="#opencl" title="Link to this heading">¶</a></h3>
<p>The <a class="reference external" href="https://developer.nvidia.com/opencl">NVIDIA Open Computing Language</a> library.
This is a shared library only.</p>
<p>Targets Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::OpenCL</span></code></p></li>
</ul>
</section>
<section id="culibos">
<h3>cuLIBOS<a class="headerlink" href="#culibos" title="Link to this heading">¶</a></h3>
<p>The cuLIBOS library is a backend thread abstraction layer library which is
static only.  The <code class="docutils literal notranslate"><span class="pre">CUDA::cublas_static</span></code>, <code class="docutils literal notranslate"><span class="pre">CUDA::cusparse_static</span></code>,
<code class="docutils literal notranslate"><span class="pre">CUDA::cufft_static</span></code>, <code class="docutils literal notranslate"><span class="pre">CUDA::curand_static</span></code>, and (when implemented) NPP
libraries all automatically have this dependency linked.</p>
<p>Target Created:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CUDA::culibos</span></code></p></li>
</ul>
<p><strong>Note</strong>: direct usage of this target by consumers should not be necessary.</p>
</section>
</section>
<section id="result-variables">
<h2>Result variables<a class="headerlink" href="#result-variables" title="Link to this heading">¶</a></h2>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_FOUND</span></code></dt><dd><p>A boolean specifying whether or not the CUDA Toolkit was found.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_VERSION</span></code></dt><dd><p>The exact version of the CUDA Toolkit found (as reported by
<code class="docutils literal notranslate"><span class="pre">nvcc</span> <span class="pre">--version</span></code>, <code class="docutils literal notranslate"><span class="pre">version.txt</span></code>, or <code class="docutils literal notranslate"><span class="pre">version.json</span></code>).</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_VERSION_MAJOR</span></code></dt><dd><p>The major version of the CUDA Toolkit.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_VERSION_MINOR</span></code></dt><dd><p>The minor version of the CUDA Toolkit.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_VERSION_PATCH</span></code></dt><dd><p>The patch version of the CUDA Toolkit.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_BIN_DIR</span></code></dt><dd><p>The path to the CUDA Toolkit library directory that contains the CUDA
executable <code class="docutils literal notranslate"><span class="pre">nvcc</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_INCLUDE_DIRS</span></code></dt><dd><p>List of paths to all the CUDA Toolkit folders containing header files
required to compile a project linking against CUDA.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_LIBRARY_DIR</span></code></dt><dd><p>The path to the CUDA Toolkit library directory that contains the CUDA
Runtime library <code class="docutils literal notranslate"><span class="pre">cudart</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_LIBRARY_ROOT</span></code></dt><dd><div class="versionadded">
<p><span class="versionmodified added">Added in version 3.18.</span></p>
</div>
<p>The path to the CUDA Toolkit directory containing the nvvm directory and
either version.txt or version.json.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_TARGET_DIR</span></code></dt><dd><p>The path to the CUDA Toolkit directory including the target architecture
when cross-compiling. When not cross-compiling this will be equivalent to
the parent directory of <code class="docutils literal notranslate"><span class="pre">CUDAToolkit_BIN_DIR</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CUDAToolkit_NVCC_EXECUTABLE</span></code></dt><dd><p>The path to the NVIDIA CUDA compiler <code class="docutils literal notranslate"><span class="pre">nvcc</span></code>.  Note that this path may
<strong>not</strong> be the same as
<span class="target" id="index-1-variable:CMAKE_&lt;LANG&gt;_COMPILER"></span><a class="reference internal" href="../variable/CMAKE_LANG_COMPILER.html#variable:CMAKE_&lt;LANG&gt;_COMPILER" title="CMAKE_&lt;LANG&gt;_COMPILER"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CUDA_COMPILER</span></code></a>.  <code class="docutils literal notranslate"><span class="pre">nvcc</span></code> must be
found to determine the CUDA Toolkit version as well as determining other
features of the Toolkit.  This variable is set for the convenience of
modules that depend on this one.</p>
</dd>
</dl>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  <div>
    <h3>Table of Contents</h3>
    <ul>
<li><a class="reference internal" href="#">FindCUDAToolkit</a><ul>
<li><a class="reference internal" href="#search-behavior">Search Behavior</a></li>
<li><a class="reference internal" href="#arguments">Arguments</a></li>
<li><a class="reference internal" href="#options">Options</a></li>
<li><a class="reference internal" href="#imported-targets">Imported Targets</a><ul>
<li><a class="reference internal" href="#cuda-runtime-library">CUDA Runtime Library</a></li>
<li><a class="reference internal" href="#cuda-driver-library">CUDA Driver Library</a></li>
<li><a class="reference internal" href="#cublas">cuBLAS</a></li>
<li><a class="reference internal" href="#cudla">cuDLA</a></li>
<li><a class="reference internal" href="#cufile">cuFile</a></li>
<li><a class="reference internal" href="#cufft">cuFFT</a></li>
<li><a class="reference internal" href="#curand">cuRAND</a></li>
<li><a class="reference internal" href="#cusolver">cuSOLVER</a></li>
<li><a class="reference internal" href="#cusparse">cuSPARSE</a></li>
<li><a class="reference internal" href="#cupti">cupti</a></li>
<li><a class="reference internal" href="#npp">NPP</a></li>
<li><a class="reference internal" href="#nvblas">nvBLAS</a></li>
<li><a class="reference internal" href="#nvgraph">nvGRAPH</a></li>
<li><a class="reference internal" href="#nvjpeg">nvJPEG</a></li>
<li><a class="reference internal" href="#nvptx-compiler">nvPTX Compiler</a></li>
<li><a class="reference internal" href="#nvrtc">nvRTC</a></li>
<li><a class="reference internal" href="#nvjitlink">nvJitLink</a></li>
<li><a class="reference internal" href="#nvfatbin">nvFatBin</a></li>
<li><a class="reference internal" href="#nvidia-ml">nvidia-ML</a></li>
<li><a class="reference internal" href="#nvtoolsext">nvToolsExt</a></li>
<li><a class="reference internal" href="#nvtx3">nvtx3</a></li>
<li><a class="reference internal" href="#opencl">OpenCL</a></li>
<li><a class="reference internal" href="#culibos">cuLIBOS</a></li>
</ul>
</li>
<li><a class="reference internal" href="#result-variables">Result variables</a></li>
</ul>
</li>
</ul>

  </div>
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="FindCoin3D.html"
                          title="previous chapter">FindCoin3D</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="FindCups.html"
                          title="next chapter">FindCups</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/module/FindCUDAToolkit.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="FindCups.html" title="FindCups"
             >next</a> |</li>
        <li class="right" >
          <a href="FindCoin3D.html" title="FindCoin3D"
             >previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" >cmake-modules(7)</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">FindCUDAToolkit</a></li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
    &#169; Copyright 2000-2025 Kitware, Inc. and Contributors.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
    </div>
<script type="text/javascript">
(function() {
  "use strict";
  const hide = () => document.getElementById("sidebar-check").checked = false;
  addEventListener("keydown", e => (e.key === "Escape") && hide());
  addEventListener("click", e => (e.target.tagName === "A") && hide());
  addEventListener("hashchange", hide)
})();
</script>
  </body>
</html>